-
Notifications
You must be signed in to change notification settings - Fork 2
Exclude namespaces #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Adds support for excluding specific Kubernetes namespaces from deployment-tracker monitoring via a new CLI flag.
Changes:
- Extends CLI with
-exclude-namespacesand prevents using it together with-namespace. - Refactors controller informer setup into
createInformerFactory(...)and adds field-selector-based namespace exclusion. - Documents the new flag and the mutual exclusivity rule in the README.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
internal/controller/controller.go |
Refactors informer factory creation and adds field-selector logic to exclude namespaces. |
cmd/deployment-tracker/main.go |
Introduces -exclude-namespaces flag, validation, and passes it into the controller. |
README.md |
Documents the new CLI flag and notes that it can’t be combined with -namespace. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
malancas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The copilot comments make sense to me. Looks good overall
This PR introduces a
-exclude-namespacesflag that accepts a comma separated list of namespaces to exclude from monitoring.I checked to see if the
-namespaceflag could also accept a comma separated list but it seemsFieldSelectorANDs together multiple values and you cannot OR them together.